var linkTargetFinder = function(){
    var prefManager = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
    return {
        init : function () {
			gBrowser.addEventListener("load", function () {
				var autoRun = prefManager.getBoolPref("extensions.linktargetfinder.autorun");
				if (autoRun) {
					linkTargetFinder.run();
				}
			}, false);
		},
        run :   function(){
                    alert("{appname} test!!!");
                }
    }
}

window.addEventListener("load", linkTargetFinder.run, false);